<!doctype html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
#after {
  color: #BBB;
  -webkit-user-modify: read-only;
}
#editor {
  -webkit-user-modify: read-write-plaintext-only;
  border: 1px solid black;
  font-size: 40px;
}
</style>
Test passes if caret is visible after text is entered.
<div id="editor"></div>
<script>
var after;
editor.addEventListener("input",function(e) {
  if (!after){
    after = document.createElement("span");
    after.id = "after";
    after.textContent = "autocomplete hint text";
    editor.appendChild(after);
  }
});
runAfterLayoutAndPaint(function() {
  editor.focus();
  if (window.testRunner) {
    eventSender.keyDown('a');
    eventSender.keyDown('b');
  }
}, true);
</script>
